1. Field of the Invention
The present invention relates to an image processing device, an image processing method, and an imaging device.
Priority is claimed on Japanese Patent Application No. 2013-254123, filed Dec. 9, 2013, the content of which is incorporated herein by reference.
2. Description of Related Art
In photographing by an imaging device such as a digital camera, various processing is performed on a signal of each pixel (hereinafter referred to as a “pixel signal”) output from a solid-state imaging device provided in the imaging device. This processing is image processing for forming an image captured by the solid-state imaging device, processing for control related to photographing by the imaging device, or the like.
For the image processing to be performed by the imaging device, by finding a correlation between a target pixel within an image captured by the solid-state imaging device and a pixel of the same color positioned in the vicinity of the target pixel (hereinafter referred to as a “reference pixel”), the degree of similarity between the target pixel and the reference pixel is obtained to use a result of the degree of similarity in image processing. As a technique of finding the correlation between the target pixel and the reference pixel, block matching by calculation of a sum of absolute differences (SAD) is widely known. For example, in the publication of Japanese Unexamined Patent Application, First Publication No. 2007-088910, technology for finding a correlation through the block matching between a criterion block having a specific region including a target pixel and a reference block having a region including a reference pixel and having the same size as the criterion block is disclosed.
In this block matching technique based on SAD calculation, an absolute value of a pixel value difference between pixels positioned in the same coordinates in the target block including a region having a predetermined size around the target pixel and the reference block including a region having the same size as the target block around the reference pixel is calculated, and difference absolute values calculated for all pixels included in the target block are integrated.
For example, as illustrated in FIG. 12A, the case in which a correlation between a target pixel (6, 6) of a coordinate position of the horizontal direction x=6 and the vertical direction y=6 and a reference pixel (2, 2) of a coordinate position of the horizontal direction x=2 and the vertical direction y=2, that is, a reference pixel of a coordinate position shifted by −4 in the horizontal direction and −4 in the vertical direction from the coordinate position of the target pixel, is found is considered. At this time, as illustrated in FIG. 12B, a region of a target block is designated as a region of 5-by-5 pixels in the horizontal and vertical directions around the target pixel, that is, a region of 5 pixels×5 pixels, and a reference block is designated as a region of 5 pixels×5 pixels having the same size as the target block around the reference pixel. In this case, it is possible to obtain a result of SAD calculation (hereinafter referred to as an “SAD calculation result”) according to the following Equation (1) in the SAD calculation for the target block.
                              SAD          ⁡                      (                          x              ,              y                        )                          =                              ∑                                                            -                  2                                ≦                i                ≦                2                            ,                                                -                  2                                ≦                j                ≦                2                                                                                    ⁢                                                                A                ⁡                                  (                                                            x                      +                      i                                        ,                                          y                      +                      j                                                        )                                            -                              B                ⁡                                  (                                                            x                      +                      i                      -                      4                                        ,                                          y                      +                      j                      -                      4                                                        )                                                                                                    (        1        )            
In the above Equation (1), SAD(x, y) represents an SAD calculation result corresponding to a target block around a target pixel (x, y) positioned in a coordinate position of the horizontal direction x and the vertical direction y. In addition, in the above Equation (1), A(x, y) represents a pixel value of a pixel within the target block around the target pixel (x, y) positioned in a coordinate position of the horizontal direction x and the vertical direction y, and B(x, y) represents a pixel value of a pixel within a reference block corresponding to each pixel within the target block around the target pixel (x, y) positioned in the coordinate position of the horizontal direction x and the vertical direction y. In addition, in the above Equation (1), i and j are integers. Moreover, a coordinate position of the horizontal direction x and the vertical direction y is also shifted by “−4” in the pixel value B(x, y) of a pixel within the reference block of the above Equation (1) because a coordinate position of each pixel within the reference block is a coordinate position shifted by −4 in the horizontal direction and −4 in the vertical direction from a coordinate position of each corresponding pixel included within the target block.
In recent years, in order to cope with the recent speed-up of imaging devices, a solid-state imaging device for simultaneously outputting a plurality of pixel signals is mounted on an imaging device in many cases. Also, an output form of the solid-state imaging device for simultaneously outputting the plurality of pixel signals, for example, is a form in which pixel signals of two pixels adjacent in the horizontal direction are simultaneously output, a form in which pixel signals of two pixels adjacent in the vertical direction are simultaneously output, or the like. In addition, there is a form in which pixel signals of two pixels adjacent in the horizontal direction and pixel signals of two pixels adjacent in the vertical direction, that is, the pixel signals of the four pixels, are simultaneously output.
It is necessary to simultaneously perform SAD calculations based on pixels to be simultaneously output when SAD calculation is performed in such an imaging device equipped with the solid-state imaging device for simultaneously outputting a plurality of pixel signals. Because of this, the conventional imaging device corresponds to a solid-state imaging device for simultaneously outputting a plurality of pixels signals by providing SAD calculation units equal in number to channels through which pixel signals from the solid-state imaging device are simultaneously output, wherein the SAD calculation unit includes calculation circuits configured to calculate a difference absolute value for one pixel and the number of calculation circuits is the same as the number of pixels included in the target block (5×5=25 in the case of FIGS. 12A and 12B) within an image processing unit configured to perform image processing on pixel signals output from the solid-state imaging device.